import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { AssetsResolveService } from '../service/AssetsResolveService';
import { DepartmentsAllResolveService } from '../service/DepartmentsAllResolveService';
import { UsersAllResolveService } from '../service/UsersAllResolveService';
import { AssetListComponent } from '../components/assetList/assetList';
import { AssetTypeResolveService } from '../service/AssetTypeResolveService';
import { AuthGuardService } from '../service/AuthGuardService';

const routes: Routes = [
    {
      path: 'asset',
      component: AssetListComponent,
      canActivate: [AuthGuardService],
      resolve: {
          // results: AssetsResolveService,
          departments: DepartmentsAllResolveService,
          users: UsersAllResolveService,
          assetTypes: AssetTypeResolveService
      }
    }
];

@NgModule({
    imports: [ RouterModule.forChild(routes) ],
    exports: [ RouterModule ],
    providers: [
      // AssetsResolveService,
      DepartmentsAllResolveService,
      UsersAllResolveService,
      AssetTypeResolveService
    ]

})
export class AssetRoutingModule {}
